package cn.baiy;

import javax.swing.*;

//水雷潜艇类
public class MineSubmarine extends SeaObject implements EnemyLife{  //继承

    public MineSubmarine(){
        super(63,19);
    }

    @Override
    public void move(){
        x += speed; //向右移动
        }

    @Override
    public ImageIcon getImage(){
        return Images.minesubm;
    }

    public Mine shootMine(){ //生成水雷
        int x = this.x+width;
        int y = this.y-5;
        return new Mine(x,y);
    }

    public int getLife(){ //得命
        return 1;
    }

}
